﻿<!doctype html>
<html>
<head>
<meta name="apple-mobile-web-app-capable" content="yes">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0">
<title>回复</title>
<link href="../../css/newStyle.css" type="text/css" rel="stylesheet" />
<script type="text/javascript" src="../../js/jquery-1.7.2.min.js"></script>
<script type="text/javascript" src="../../js/common.js"></script>
<script type="text/javascript" src="../../js/gbRst.js"></script>
<script type="text/javascript" src="../../js/utils.js"></script>
<script type="text/javascript" src="../../js/openId.js"></script>
<script type="text/javascript" src="../../js/ajaxfileupload.js"></script> 
<script type="text/javascript" src="../../js/header&footer.js"></script>
<script type="text/javascript" src="../../js/check.js"></script>
		<script type="text/javascript" src="../../js/qmsk-1.2.js"></script>
<script type="text/javascript">

function toSaveS(){ 

	var result=$("#result").val();
	var reply = $("#reply").val()
	if(IsEmpty(result)){
		alert("处理结果不能为空")
		$("#result").focus();
		return false;		
	}
	var id = getIdByName("id");
	var flag = getIdByName("flag");
	var url = "";
	if(flag==1){
		url="../../../tryRecord/edit/deal"
	}else if(flag==2){
		url="../../../overServiceRecord/edit/deal"
	}else if(flag==3){
		url = "../../../insuranceRecord/edit/deal"
	}else if(flag==4){
		url = "../../../reassessRecord/edit/deal"
	}
	var heads  = new Array("result","Status","id");
	var datas  = new Array(result,2,id);
	var json = _getJsonParseEditStr(heads, datas);
	var dt = _editInfo(url, {'data':json,'reply':reply})
	if(IsNotEmpty(dt)&&dt.state==0){
		var htm ="";  
		if(flag==1){
			htm="workerTryDriver.html"
		}else if(flag==2){
			htm="wokerServiceRecord.html"
		}else if(flag==3){
			htm="wokerInsuranceRecord.html"
		}else if(flag==4){
			htm="wokerReAsserssRecord.html"
		}	
		
		htm+="?openId="+_openId+"&shopId="+_shopId+"&userId="+getIdByName("userId")
		redirectUrl(htm);
	}
}
function restForm(){
	$("#title").val("")
	$("#saytext").val("");
	$("#searchM").hide();
	
}
function returnback(){
	var flag = getIdByName("flag");
	if(flag==1){
		htm="workerTryDriver.html"
	}else if(flag==2){
		htm="wokerServiceRecord.html"
	}else if(flag==3){
		htm="wokerInsuranceRecord.html"
	}else if(flag==4){
		htm="wokerReAsserssRecord.html"
	}	
	
	htm+="?openId="+_openId+"&shopId="+_shopId+"&userId="+getIdByName("userId")
	redirectUrl(htm)
}
</script>
</head>

<body>
<div class="wrapper">
    <div class="placeTit"><a class="back" onclick="returnback()" href="javascript:void(0)" ></a>回复和处理结果</div>
  <div class="container">
    <div class="person">
    	回复<span class="red">*</span>
      <textarea class="saytext" id="reply"></textarea>
    </div>
    <div class="person">
    	处理结果<span class="red">*</span>
      <textarea class="saytext" id="result"></textarea>
    </div>
      <div class="give">
        <input type="button" value="提交" class="giveBtn" onclick="toSaveS()">
      </div>
  </div>
</div>
</body>
</html>
